Integrand size = 21, antiderivative size = 162 \[ \int \csc ^3(c+d x) (a+b \sec (c+d x))^3 \, dx=-\frac {a^2 \left (b \left (3+\frac {b^2}{a^2}\right )+a \left (1+\frac {3 b^2}{a^2}\right ) \cos (c+d x)\right ) \csc ^2(c+d x)}{2 d}+\frac {(a+b)^2 (a+4 b) \log (1-\cos (c+d x))}{4 d}-\frac {b \left (3 a^2+2 b^2\right ) \log (\cos (c+d x))}{d}-\frac {(a-4 b) (a-b)^2 \log (1+\cos (c+d x))}{4 d}+\frac {3 a b^2 \sec (c+d x)}{d}+\frac {b^3 \sec ^2(c+d x)}{2 d} \]
[Out]
Time = 0.40 (sec) , antiderivative size = 162, normalized size of antiderivative = 1.00, number of steps used = 6, number of rules used = 5, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.238, Rules used = {3957, 2916, 12, 1819, 1816} \[ \int \csc ^3(c+d x) (a+b \sec (c+d x))^3 \, dx=-\frac {b \left (3 a^2+2 b^2\right ) \log (\cos (c+d x))}{d}-\frac {a^2 \csc ^2(c+d x) \left (a \left (\frac {3 b^2}{a^2}+1\right ) \cos (c+d x)+b \left (\frac {b^2}{a^2}+3\right )\right )}{2 d}+\frac {3 a b^2 \sec (c+d x)}{d}+\frac {(a+b)^2 (a+4 b) \log (1-\cos (c+d x))}{4 d}-\frac {(a-4 b) (a-b)^2 \log (\cos (c+d x)+1)}{4 d}+\frac {b^3 \sec ^2(c+d x)}{2 d} \]
[In]
[Out]
Rule 12
Rule 1816
Rule 1819
Rule 2916
Rule 3957
Rubi steps \begin{align*} \text {integral}& = -\int (-b-a \cos (c+d x))^3 \csc ^3(c+d x) \sec ^3(c+d x) \, dx \\ & = \frac {a^3 \text {Subst}\left (\int \frac {a^3 (-b+x)^3}{x^3 \left (a^2-x^2\right )^2} \, dx,x,-a \cos (c+d x)\right )}{d} \\ & = \frac {a^6 \text {Subst}\left (\int \frac {(-b+x)^3}{x^3 \left (a^2-x^2\right )^2} \, dx,x,-a \cos (c+d x)\right )}{d} \\ & = -\frac {a^2 \left (b \left (3+\frac {b^2}{a^2}\right )+a \left (1+\frac {3 b^2}{a^2}\right ) \cos (c+d x)\right ) \csc ^2(c+d x)}{2 d}-\frac {a^4 \text {Subst}\left (\int \frac {2 b^3-6 b^2 x+2 b \left (3+\frac {b^2}{a^2}\right ) x^2-\left (1+\frac {3 b^2}{a^2}\right ) x^3}{x^3 \left (a^2-x^2\right )} \, dx,x,-a \cos (c+d x)\right )}{2 d} \\ & = -\frac {a^2 \left (b \left (3+\frac {b^2}{a^2}\right )+a \left (1+\frac {3 b^2}{a^2}\right ) \cos (c+d x)\right ) \csc ^2(c+d x)}{2 d}-\frac {a^4 \text {Subst}\left (\int \left (-\frac {(a-4 b) (a-b)^2}{2 a^4 (a-x)}+\frac {2 b^3}{a^2 x^3}-\frac {6 b^2}{a^2 x^2}+\frac {2 \left (3 a^2 b+2 b^3\right )}{a^4 x}-\frac {(a+b)^2 (a+4 b)}{2 a^4 (a+x)}\right ) \, dx,x,-a \cos (c+d x)\right )}{2 d} \\ & = -\frac {a^2 \left (b \left (3+\frac {b^2}{a^2}\right )+a \left (1+\frac {3 b^2}{a^2}\right ) \cos (c+d x)\right ) \csc ^2(c+d x)}{2 d}+\frac {(a+b)^2 (a+4 b) \log (1-\cos (c+d x))}{4 d}-\frac {b \left (3 a^2+2 b^2\right ) \log (\cos (c+d x))}{d}-\frac {(a-4 b) (a-b)^2 \log (1+\cos (c+d x))}{4 d}+\frac {3 a b^2 \sec (c+d x)}{d}+\frac {b^3 \sec ^2(c+d x)}{2 d} \\ \end{align*}
Leaf count is larger than twice the leaf count of optimal. \(669\) vs. \(2(162)=324\).
Time = 7.22 (sec) , antiderivative size = 669, normalized size of antiderivative = 4.13 \[ \int \csc ^3(c+d x) (a+b \sec (c+d x))^3 \, dx=\frac {3 a b^2 \cos ^3(c+d x) (a+b \sec (c+d x))^3}{d (b+a \cos (c+d x))^3}+\frac {\left (-a^3-3 a^2 b-3 a b^2-b^3\right ) \cos ^3(c+d x) \csc ^2\left (\frac {1}{2} (c+d x)\right ) (a+b \sec (c+d x))^3}{8 d (b+a \cos (c+d x))^3}+\frac {\left (-a^3+6 a^2 b-9 a b^2+4 b^3\right ) \cos ^3(c+d x) \log \left (\cos \left (\frac {1}{2} (c+d x)\right )\right ) (a+b \sec (c+d x))^3}{2 d (b+a \cos (c+d x))^3}+\frac {\left (-3 a^2 b-2 b^3\right ) \cos ^3(c+d x) \log (\cos (c+d x)) (a+b \sec (c+d x))^3}{d (b+a \cos (c+d x))^3}+\frac {\left (a^3+6 a^2 b+9 a b^2+4 b^3\right ) \cos ^3(c+d x) \log \left (\sin \left (\frac {1}{2} (c+d x)\right )\right ) (a+b \sec (c+d x))^3}{2 d (b+a \cos (c+d x))^3}+\frac {\left (a^3-3 a^2 b+3 a b^2-b^3\right ) \cos ^3(c+d x) \sec ^2\left (\frac {1}{2} (c+d x)\right ) (a+b \sec (c+d x))^3}{8 d (b+a \cos (c+d x))^3}+\frac {b^3 \cos ^3(c+d x) (a+b \sec (c+d x))^3}{4 d (b+a \cos (c+d x))^3 \left (\cos \left (\frac {1}{2} (c+d x)\right )-\sin \left (\frac {1}{2} (c+d x)\right )\right )^2}+\frac {3 a b^2 \cos ^3(c+d x) (a+b \sec (c+d x))^3 \sin \left (\frac {1}{2} (c+d x)\right )}{d (b+a \cos (c+d x))^3 \left (\cos \left (\frac {1}{2} (c+d x)\right )-\sin \left (\frac {1}{2} (c+d x)\right )\right )}+\frac {b^3 \cos ^3(c+d x) (a+b \sec (c+d x))^3}{4 d (b+a \cos (c+d x))^3 \left (\cos \left (\frac {1}{2} (c+d x)\right )+\sin \left (\frac {1}{2} (c+d x)\right )\right )^2}-\frac {3 a b^2 \cos ^3(c+d x) (a+b \sec (c+d x))^3 \sin \left (\frac {1}{2} (c+d x)\right )}{d (b+a \cos (c+d x))^3 \left (\cos \left (\frac {1}{2} (c+d x)\right )+\sin \left (\frac {1}{2} (c+d x)\right )\right )} \]
[In]
[Out]
Time = 1.31 (sec) , antiderivative size = 162, normalized size of antiderivative = 1.00
method | result | size |
derivativedivides | \(\frac {a^{3} \left (-\frac {\cot \left (d x +c \right ) \csc \left (d x +c \right )}{2}+\frac {\ln \left (-\cot \left (d x +c \right )+\csc \left (d x +c \right )\right )}{2}\right )+3 a^{2} b \left (-\frac {1}{2 \sin \left (d x +c \right )^{2}}+\ln \left (\tan \left (d x +c \right )\right )\right )+3 a \,b^{2} \left (-\frac {1}{2 \sin \left (d x +c \right )^{2} \cos \left (d x +c \right )}+\frac {3}{2 \cos \left (d x +c \right )}+\frac {3 \ln \left (-\cot \left (d x +c \right )+\csc \left (d x +c \right )\right )}{2}\right )+b^{3} \left (\frac {1}{2 \sin \left (d x +c \right )^{2} \cos \left (d x +c \right )^{2}}-\frac {1}{\sin \left (d x +c \right )^{2}}+2 \ln \left (\tan \left (d x +c \right )\right )\right )}{d}\) | \(162\) |
default | \(\frac {a^{3} \left (-\frac {\cot \left (d x +c \right ) \csc \left (d x +c \right )}{2}+\frac {\ln \left (-\cot \left (d x +c \right )+\csc \left (d x +c \right )\right )}{2}\right )+3 a^{2} b \left (-\frac {1}{2 \sin \left (d x +c \right )^{2}}+\ln \left (\tan \left (d x +c \right )\right )\right )+3 a \,b^{2} \left (-\frac {1}{2 \sin \left (d x +c \right )^{2} \cos \left (d x +c \right )}+\frac {3}{2 \cos \left (d x +c \right )}+\frac {3 \ln \left (-\cot \left (d x +c \right )+\csc \left (d x +c \right )\right )}{2}\right )+b^{3} \left (\frac {1}{2 \sin \left (d x +c \right )^{2} \cos \left (d x +c \right )^{2}}-\frac {1}{\sin \left (d x +c \right )^{2}}+2 \ln \left (\tan \left (d x +c \right )\right )\right )}{d}\) | \(162\) |
norman | \(\frac {-\frac {a^{3}+3 a^{2} b +3 a \,b^{2}+b^{3}}{8 d}+\frac {\left (a^{3}+15 a \,b^{2}\right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}}{2 d}+\frac {\left (a^{3}-3 a^{2} b +3 a \,b^{2}-b^{3}\right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{8}}{8 d}-\frac {\left (2 a^{3}-3 a^{2} b +30 a \,b^{2}-9 b^{3}\right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{4}}{4 d}}{\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2} \left (-1+\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}\right )^{2}}+\frac {\left (a^{3}+6 a^{2} b +9 a \,b^{2}+4 b^{3}\right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{2 d}-\frac {b \left (3 a^{2}+2 b^{2}\right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}{d}-\frac {b \left (3 a^{2}+2 b^{2}\right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}{d}\) | \(250\) |
parallelrisch | \(\frac {-192 \left (1+\cos \left (2 d x +2 c \right )\right ) \left (a^{2}+\frac {2 b^{2}}{3}\right ) b \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )-192 \left (1+\cos \left (2 d x +2 c \right )\right ) \left (a^{2}+\frac {2 b^{2}}{3}\right ) b \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )+32 \left (4 b +a \right ) \left (a +b \right )^{2} \left (1+\cos \left (2 d x +2 c \right )\right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )+\left (\left (-16 \cos \left (2 d x +2 c \right ) b^{3}+\left (-a^{3}-15 a \,b^{2}+2 b^{3}\right ) \cos \left (4 d x +4 c \right )+\left (-4 a^{3}-36 a \,b^{2}\right ) \cos \left (3 d x +3 c \right )+\left (-12 a^{3}-12 a \,b^{2}\right ) \cos \left (d x +c \right )+a^{3}-48 a^{2} b +15 a \,b^{2}-2 b^{3}\right ) \sec \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}+192 a^{2} b \right ) \csc \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}-192 a^{2} b \cot \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}}{64 d \left (1+\cos \left (2 d x +2 c \right )\right )}\) | \(274\) |
risch | \(\frac {a^{3} {\mathrm e}^{7 i \left (d x +c \right )}+9 a \,b^{2} {\mathrm e}^{7 i \left (d x +c \right )}+6 a^{2} b \,{\mathrm e}^{6 i \left (d x +c \right )}+4 b^{3} {\mathrm e}^{6 i \left (d x +c \right )}+3 a^{3} {\mathrm e}^{5 i \left (d x +c \right )}+3 a \,b^{2} {\mathrm e}^{5 i \left (d x +c \right )}+12 a^{2} b \,{\mathrm e}^{4 i \left (d x +c \right )}+3 a^{3} {\mathrm e}^{3 i \left (d x +c \right )}+3 a \,b^{2} {\mathrm e}^{3 i \left (d x +c \right )}+6 a^{2} b \,{\mathrm e}^{2 i \left (d x +c \right )}+4 b^{3} {\mathrm e}^{2 i \left (d x +c \right )}+a^{3} {\mathrm e}^{i \left (d x +c \right )}+9 b^{2} a \,{\mathrm e}^{i \left (d x +c \right )}}{d \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right )^{2} \left ({\mathrm e}^{2 i \left (d x +c \right )}-1\right )^{2}}-\frac {a^{3} \ln \left ({\mathrm e}^{i \left (d x +c \right )}+1\right )}{2 d}+\frac {3 \ln \left ({\mathrm e}^{i \left (d x +c \right )}+1\right ) a^{2} b}{d}-\frac {9 \ln \left ({\mathrm e}^{i \left (d x +c \right )}+1\right ) a \,b^{2}}{2 d}+\frac {2 \ln \left ({\mathrm e}^{i \left (d x +c \right )}+1\right ) b^{3}}{d}+\frac {a^{3} \ln \left ({\mathrm e}^{i \left (d x +c \right )}-1\right )}{2 d}+\frac {3 \ln \left ({\mathrm e}^{i \left (d x +c \right )}-1\right ) a^{2} b}{d}+\frac {9 \ln \left ({\mathrm e}^{i \left (d x +c \right )}-1\right ) a \,b^{2}}{2 d}+\frac {2 \ln \left ({\mathrm e}^{i \left (d x +c \right )}-1\right ) b^{3}}{d}-\frac {3 b \ln \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right ) a^{2}}{d}-\frac {2 b^{3} \ln \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right )}{d}\) | \(425\) |
[In]
[Out]
none
Time = 0.28 (sec) , antiderivative size = 290, normalized size of antiderivative = 1.79 \[ \int \csc ^3(c+d x) (a+b \sec (c+d x))^3 \, dx=-\frac {12 \, a b^{2} \cos \left (d x + c\right ) - 2 \, {\left (a^{3} + 9 \, a b^{2}\right )} \cos \left (d x + c\right )^{3} + 2 \, b^{3} - 2 \, {\left (3 \, a^{2} b + 2 \, b^{3}\right )} \cos \left (d x + c\right )^{2} + 4 \, {\left ({\left (3 \, a^{2} b + 2 \, b^{3}\right )} \cos \left (d x + c\right )^{4} - {\left (3 \, a^{2} b + 2 \, b^{3}\right )} \cos \left (d x + c\right )^{2}\right )} \log \left (-\cos \left (d x + c\right )\right ) + {\left ({\left (a^{3} - 6 \, a^{2} b + 9 \, a b^{2} - 4 \, b^{3}\right )} \cos \left (d x + c\right )^{4} - {\left (a^{3} - 6 \, a^{2} b + 9 \, a b^{2} - 4 \, b^{3}\right )} \cos \left (d x + c\right )^{2}\right )} \log \left (\frac {1}{2} \, \cos \left (d x + c\right ) + \frac {1}{2}\right ) - {\left ({\left (a^{3} + 6 \, a^{2} b + 9 \, a b^{2} + 4 \, b^{3}\right )} \cos \left (d x + c\right )^{4} - {\left (a^{3} + 6 \, a^{2} b + 9 \, a b^{2} + 4 \, b^{3}\right )} \cos \left (d x + c\right )^{2}\right )} \log \left (-\frac {1}{2} \, \cos \left (d x + c\right ) + \frac {1}{2}\right )}{4 \, {\left (d \cos \left (d x + c\right )^{4} - d \cos \left (d x + c\right )^{2}\right )}} \]
[In]
[Out]
\[ \int \csc ^3(c+d x) (a+b \sec (c+d x))^3 \, dx=\int \left (a + b \sec {\left (c + d x \right )}\right )^{3} \csc ^{3}{\left (c + d x \right )}\, dx \]
[In]
[Out]
none
Time = 0.20 (sec) , antiderivative size = 171, normalized size of antiderivative = 1.06 \[ \int \csc ^3(c+d x) (a+b \sec (c+d x))^3 \, dx=-\frac {{\left (a^{3} - 6 \, a^{2} b + 9 \, a b^{2} - 4 \, b^{3}\right )} \log \left (\cos \left (d x + c\right ) + 1\right ) - {\left (a^{3} + 6 \, a^{2} b + 9 \, a b^{2} + 4 \, b^{3}\right )} \log \left (\cos \left (d x + c\right ) - 1\right ) + 4 \, {\left (3 \, a^{2} b + 2 \, b^{3}\right )} \log \left (\cos \left (d x + c\right )\right ) + \frac {2 \, {\left (6 \, a b^{2} \cos \left (d x + c\right ) - {\left (a^{3} + 9 \, a b^{2}\right )} \cos \left (d x + c\right )^{3} + b^{3} - {\left (3 \, a^{2} b + 2 \, b^{3}\right )} \cos \left (d x + c\right )^{2}\right )}}{\cos \left (d x + c\right )^{4} - \cos \left (d x + c\right )^{2}}}{4 \, d} \]
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. 482 vs. \(2 (154) = 308\).
Time = 0.38 (sec) , antiderivative size = 482, normalized size of antiderivative = 2.98 \[ \int \csc ^3(c+d x) (a+b \sec (c+d x))^3 \, dx=-\frac {\frac {a^{3} {\left (\cos \left (d x + c\right ) - 1\right )}}{\cos \left (d x + c\right ) + 1} - \frac {3 \, a^{2} b {\left (\cos \left (d x + c\right ) - 1\right )}}{\cos \left (d x + c\right ) + 1} + \frac {3 \, a b^{2} {\left (\cos \left (d x + c\right ) - 1\right )}}{\cos \left (d x + c\right ) + 1} - \frac {b^{3} {\left (\cos \left (d x + c\right ) - 1\right )}}{\cos \left (d x + c\right ) + 1} - 2 \, {\left (a^{3} + 6 \, a^{2} b + 9 \, a b^{2} + 4 \, b^{3}\right )} \log \left (\frac {{\left | -\cos \left (d x + c\right ) + 1 \right |}}{{\left | \cos \left (d x + c\right ) + 1 \right |}}\right ) + 8 \, {\left (3 \, a^{2} b + 2 \, b^{3}\right )} \log \left ({\left | -\frac {\cos \left (d x + c\right ) - 1}{\cos \left (d x + c\right ) + 1} - 1 \right |}\right ) - \frac {{\left (a^{3} + 3 \, a^{2} b + 3 \, a b^{2} + b^{3} - \frac {2 \, a^{3} {\left (\cos \left (d x + c\right ) - 1\right )}}{\cos \left (d x + c\right ) + 1} - \frac {12 \, a^{2} b {\left (\cos \left (d x + c\right ) - 1\right )}}{\cos \left (d x + c\right ) + 1} - \frac {18 \, a b^{2} {\left (\cos \left (d x + c\right ) - 1\right )}}{\cos \left (d x + c\right ) + 1} - \frac {8 \, b^{3} {\left (\cos \left (d x + c\right ) - 1\right )}}{\cos \left (d x + c\right ) + 1}\right )} {\left (\cos \left (d x + c\right ) + 1\right )}}{\cos \left (d x + c\right ) - 1} - \frac {4 \, {\left (9 \, a^{2} b + 12 \, a b^{2} + 6 \, b^{3} + \frac {18 \, a^{2} b {\left (\cos \left (d x + c\right ) - 1\right )}}{\cos \left (d x + c\right ) + 1} + \frac {12 \, a b^{2} {\left (\cos \left (d x + c\right ) - 1\right )}}{\cos \left (d x + c\right ) + 1} + \frac {8 \, b^{3} {\left (\cos \left (d x + c\right ) - 1\right )}}{\cos \left (d x + c\right ) + 1} + \frac {9 \, a^{2} b {\left (\cos \left (d x + c\right ) - 1\right )}^{2}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{2}} + \frac {6 \, b^{3} {\left (\cos \left (d x + c\right ) - 1\right )}^{2}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{2}}\right )}}{{\left (\frac {\cos \left (d x + c\right ) - 1}{\cos \left (d x + c\right ) + 1} + 1\right )}^{2}}}{8 \, d} \]
[In]
[Out]
Time = 13.96 (sec) , antiderivative size = 159, normalized size of antiderivative = 0.98 \[ \int \csc ^3(c+d x) (a+b \sec (c+d x))^3 \, dx=\frac {\ln \left (\cos \left (c+d\,x\right )-1\right )\,{\left (a+b\right )}^2\,\left (a+4\,b\right )}{4\,d}-\frac {\ln \left (\cos \left (c+d\,x\right )\right )\,\left (3\,a^2\,b+2\,b^3\right )}{d}-\frac {{\cos \left (c+d\,x\right )}^3\,\left (\frac {a^3}{2}+\frac {9\,a\,b^2}{2}\right )-\frac {b^3}{2}+{\cos \left (c+d\,x\right )}^2\,\left (\frac {3\,a^2\,b}{2}+b^3\right )-3\,a\,b^2\,\cos \left (c+d\,x\right )}{d\,\left ({\cos \left (c+d\,x\right )}^2-{\cos \left (c+d\,x\right )}^4\right )}-\frac {\ln \left (\cos \left (c+d\,x\right )+1\right )\,{\left (a-b\right )}^2\,\left (a-4\,b\right )}{4\,d} \]
[In]
[Out]